package com.bdmc.base.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bdmc.common.annotation.ExcelDictFormat;
import com.bdmc.common.convert.ExcelDictConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;


/**
 * 人员视图对象 base_person
 *
 * @author bdmc
 * @date 2022-03-03
 */
@Data
@ExcelIgnoreUnannotated
public class BasePersonVo {

	private static final long serialVersionUID = 1L;

    /**
     * 人员id
     */
	@ExcelProperty(value = "人员id")
	private Long personId;

    /**
     * 部门id
     */
	@ExcelProperty(value = "部门id")
	private Long deptId;

    /**
     * 姓名
     */
	@ExcelProperty(value = "姓名")
	private String personName;

    /**
     * 人员类型
     */
    @ExcelProperty(value = "人员类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "base_person_type")
	private String personType;

    /**
     * 设备id
     */
	@ExcelProperty(value = "设备id")
	private Long deviceId;

    /**
     * 工号
     */
	@ExcelProperty(value = "工号")
	private String personNum;

    /**
     * 联系电话
     */
	@ExcelProperty(value = "联系电话")
	private String mobile;

    /**
     * 入职日期
     */
	@ExcelProperty(value = "入职日期")
	private Date entryDate;

    /**
     * 岗位
     */
    @ExcelProperty(value = "岗位", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "base_post_name")
	private String postName;

    /**
     * 身份证号
     */
	@ExcelProperty(value = "身份证号")
	private String idcard;

    /**
     * 性别
     */
    @ExcelProperty(value = "性别", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_user_sex")
	private String sex;

    /**
     * 通讯地址
     */
	@ExcelProperty(value = "通讯地址")
	private String address;

    /**
     * 紧急联系人电话
     */
	@ExcelProperty(value = "紧急联系人电话")
	private String emergencyPhone;

    /**
     * 备注
     */
	@ExcelProperty(value = "备注")
	private String remark;

	@ExcelProperty(value = "部门名称")
	private String deptName;

	@ExcelProperty(value = "gps设备imei")
	private String imei;

	private String openid;

	private String nickName;

	private String headimgurl;

	private Integer onlineStatus;

	@ExcelProperty(value = "项目名称")
	private String projectName;

	@ExcelProperty(value = "街道名称")
	private String streetName;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime dataTime;
}
